﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:commonViews="clr-namespace:Albatross.WPF.Common.Views;assembly=Albatross.WPF.Common"
					xmlns:vm="clr-namespace:Albatross.SharePoint.Explorer.ViewModels">

	<vm:ShellMenuViewModel x:Key="shell menu viewmodel" />

    <Style TargetType="MenuItem" x:Key="spsite menuitem">
        <Setter Property="Header" Value="{Binding Name}" />
		<Setter Property="Command" Value="{Binding LaunchSiteCommand}" />
		<Setter Property="CommandParameter" Value="{Binding (commonViews:Attached.ViewService), RelativeSource={RelativeSource Self}}" />

	</Style>
	<MenuItem x:Key="shell menu item" Header="SharePoint" DataContext="{StaticResource shell menu viewmodel}" x:Name="Root">
		<MenuItem Header="Sites" ItemsSource="{Binding Sites}"  ItemContainerStyle="{StaticResource spsite menuitem}" />
        <Separator/>
		<MenuItem Header="Setup" Command="{Binding SetupCommand}" CommandParameter="{Binding (commonViews:Attached.ViewService), RelativeSource={RelativeSource Self}}"/>
	</MenuItem>
</ResourceDictionary>